# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>

pkgname=melange
pkgver=0.2.0
pkgrel=1
pkgdesc='Build APKs from source code'
url='https://github.com/chainguard-dev/melange'
arch=('loong64' 'x86_64')
license=('Apache')
depends=('apk-tools' 'alpine-keyring' 'bubblewrap')
makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/chainguard-dev/melange/archive/v${pkgver}.tar.gz")
b2sums=('1ce99d3f6adf4a3206aa20b03689d5a31ae3a9a88bb57dbdf3c395438299664e57df79c9ad619deb84935dbe3fc687d4d2dd9166a8bbd15389fee9a9fb2cded9')

build() {
  cd ${pkgname}-${pkgver}
  make melange
}

package() {
  cd ${pkgname}-${pkgver}
  install -Dm 755 melange -t "${pkgdir}/usr/bin"
  install -dm 755 "${pkgdir}/usr/share/melange"
  cp -a pkg/build/pipelines/ "${pkgdir}/usr/share/melange"
}

# vim: ts=2 sw=2 et:
